package com.hksj.Intelligentmanagement.auth.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hksj.Intelligentmanagement.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.FieldNameConstants;

/**
 * 用户表
 */
@Data
@FieldNameConstants
@TableName("sys_user")
@ApiModel(value="User对象", description="用户表")
public class User extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "昵称")
    @TableField("nick_name")
    private String nickName;

    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "账号状态（0正常 1停用）")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "手机号")
    @TableField("phone_number")
    private String phoneNumber;

    @ApiModelProperty(value = "用户性别（0女，1男，2未知）")
    @TableField("sex")
    private String sex;

    @ApiModelProperty(value = "头像")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty(value = "用户类型（0管理员，1普通用户）")
    @TableField("user_type")
    private String userType;

    @ApiModelProperty(value = "删除标志（0代表未删除，1代表已删除）")
    @TableField("del_flag")
    @TableLogic  //逻辑删除和义务删除标识
    private Integer delFlag;

    @ApiModelProperty(value = "创建人的用户id")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "更新人")
    @TableField("update_by")
    private String updateBy;
}
